@extends('layouts.home')
@section('title','金汇智谷——孵化中心')
@section('content')
	<link rel="stylesheet" type="text/css" href="{{asset('resources/views/home/css/teachering.css')}}">

	<div class="fruitclass">
		<table>
			<tr>
				<td width="100">所在地区：</td>
				<td>
					<ul id="areaList">
						<script type="text/javascript">
						var areaArr=['不限','华南','华北','华中','西南'];
						<?php $area=isset($_GET['area'])?$_GET['area']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<areaArr.length;i++){
							if(areaArr[i]=='{{$area}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+areaArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+areaArr[i]+'</a></li>';
							}
						}
						$('#areaList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<tr>
				<td width="100">孵化器级别：</td>
				<td>
					<ul id="lavelList">
						<script type="text/javascript">
						var lavelArr=['不限','众创空间','市级孵化器','省级孵化器','国家级孵化器','其它'];
						<?php $lavel=isset($_GET['lavel'])?$_GET['lavel']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<lavelArr.length;i++){
							if(lavelArr[i]=='{{$lavel}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+lavelArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+lavelArr[i]+'</a></li>';
							}
						}
						$('#lavelList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<tr>
				<td width="100">孵化器类型：</td>
				<td>
					<ul id="typeList">
						<script type="text/javascript">
						var typeArr=['不限','科技类','创意类','行业服务类'];
						<?php $type=isset($_GET['type'])?$_GET['type']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<typeArr.length;i++){
							if(typeArr[i]=='{{$type}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+typeArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+typeArr[i]+'</a></li>';
							}
						}
						$('#typeList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<tr>
				<td width="100">孵化器面积：</td>
				<td>
					<ul id="forestsList">
						<script forests="text/javascript">
						var forestsArr=['不限','1000~2000M2','2000~10000M2','10000~50000M2','50000+M2'];
						<?php $forests=isset($_GET['forests'])?$_GET['forests']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<forestsArr.length;i++){
							if(forestsArr[i]=='{{$forests}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+forestsArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+forestsArr[i]+'</a></li>';
							}
						}
						$('#forestsList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
		</table>
	</div>

	<script type="text/javascript">
	$(function(){
		$('#areaList li a').click(function(){
			$('#areaList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('hatch')}}?area="+$(this).text()+"&lavel={{$lavel}}&type={{$type}}&forests={{$forests}}";
		})
		$('#lavelList li a').click(function(){
			$('#lavelList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('hatch')}}?area={{$area}}&lavel="+$(this).text()+"&type={{$type}}&forests={{$forests}}";
		})
		$('#typeList li a').click(function(){
			$('#typeList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('hatch')}}?area={{$area}}&lavel={{$lavel}}&type="+$(this).text()+"&forests={{$forests}}";
		})
		$('#forestsList li a').click(function(){
			$('#forestsList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('hatch')}}?area={{$area}}&lavel={{$lavel}}&type={{$type}}&forests="+$(this).text();
		})
	})
	</script>
	<div class="w100con bggrey">
		<div class="container help">
			<div class="row">
				<div class="col-md-12">
					<div class="help-con clearfix">
							<div class="helpleft bgwhite">
                            <div class="creadf bggrey">
                              <a href="{{url('admin/hatch')}}"><button type="button" class="btn btn-danger btn-lg btn-block">我要发起孵化需求</button></a>
                            </div>
							<dl class="helpdl">
									<dt class="f20 fgrey">点击排行</dt>
					<?php $i=1; ?>
					@foreach($hatview as $v)
					<dd><span class="block" style="background:#3BC9CB;"><?php echo $i; ?></span><a href="{{url('hatch/'.$v->hat_id)}}" title="{{$v->hat_name}}">{{$v->hat_name}}</a></dd>
					<?php $i++; ?>
					@endforeach
                            </dl>
							<dl class="helpdl">
									<dt class="f20 fgrey">最新文章</dt>
					<?php $i=1; ?>
					@foreach($hattime as $t)
					<dd><span class="block" style="background:#3BC9CB;"><?php echo $i; ?></span><a href="{{url('hatch/'.$t->hat_id)}}" title="{{$t->hat_name}}">{{$t->hat_name}}</a></dd>
					<?php $i++; ?>
					@endforeach
                            </dl>
                </div>	
					<div class="helpright bgwhite">
			<h1 class="title">科技孵化&nbsp;&nbsp;&nbsp;<small>信息列表</small></h1>

			<style type="text/css">
			#vidoratorylist{
				overflow: hidden;
				padding:10px 0;
			}
			#vidoratorylist li{
				width:250px;
				overflow: hidden;
				margin:10px;
			}
			#vidoratorylist li p{
				text-align: center;
				padding:0;
			}
			#vidoratorylist li p.title{
				padding:10px 0;
				text-overflow: ellipsis;
				overflow: hidden;
				white-space: nowrap;
			}
			</style>

			<ul class="laboratorylist" id="vidoratorylist">
				<li>
					<a href="javascript:;" data="video/456.mp4">
						<img src="uploads/20161105225345589.jpg">
						<div class="laboratoryhide" style="padding-top:20px;">
							<p>地区：华中</p>
							<p>级别：众创空间</p>
							<p>类型：科技类</p>
							<p>面积：1500M2</p>
						</div>
					</a>
					<p>中国科学院</p>
				</li>
				<li>
					<a href="javascript:;" data="video/456.mp4">
						<img src="uploads/20161105225238262.jpg">
						<div class="laboratoryhide" style="padding-top:20px;">
							<p>地区：华南</p>
							<p>级别：市级孵化器</p>
							<p>类型：创意类</p>
							<p>面积：1500M2</p>
						</div>
					</a>
					<p>中国科学院</p>
				</li>
				<li>
					<a href="javascript:;" data="video/456.mp4">
						<img src="uploads/20161105225129420.jpg">
						<div class="laboratoryhide" style="padding-top:20px;">
							<p>地区：西南</p>
							<p>级别：众创空间</p>
							<p>类型：科技类</p>
							<p>面积：10000M2</p>
						</div>
					</a>
					<p>中国科学院</p>
				</li>
				<li>
					<a href="javascript:;" data="video/456.mp4">
						<img src="uploads/20161105224941953.jpg">
						<div class="laboratoryhide" style="padding-top:20px;">
							<p>地区：华南</p>
							<p>级别：众创空间</p>
							<p>类型：科技类</p>
							<p>面积：1500M2</p>
						</div>
					</a>
					<p>中国科学院</p>
				</li>
			</ul>
          </div>
				</div>
				</div>
			</div>
		</div>
	</div>	

@endsection
